package com.smart.enums;

public enum QrCodeTypeEnum {
//    HOME("1","我的卡包"),
//    STATION_CODE("2","加油站码"),
//    SEND_ECP_CODE("3","派券码"),
//    SHOP_USE_ECP_CODE("4","门店核销码"),
//    USER_USE_ECP_DETAIL_CODE("5","用户券明细核销码");
    HOME("5","我的卡包"),
    STATION_CODE("1","加油站码"),
    SEND_ECP_CODE("2","派券码"),
    SHOP_USE_ECP_CODE("3","门店核销码"),
    USER_USE_ECP_DETAIL_CODE("4","用户券明细核销码");



    private String code;
    private String name;
    QrCodeTypeEnum(String code, String name){
        this.code = code;
        this.name = name;
    }

    public static String getName(String code){
        for (QrCodeTypeEnum obj : QrCodeTypeEnum.values()) {
            if(obj.getCode().equals(code)){
                return obj.getName();
            }
        }
        return "";
    }

    public String getName() {
        return name;
    }

    public String getCode() {
        return code;
    }
}
